package com.syz.mall.mapper;

import com.syz.mall.pojo.Product;
import com.syz.mall.pojo.query.ProductQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);

    List<Product> selectAll(ProductQuery productQuery);

    List<Product> selectByTopLimit(@Param("topId") Integer topId,@Param("limit") Integer limit);
    List<Product> selectLimit(Integer limit);

    int deleteAll(Integer[] ids);

    List<Product> selectByCategoryId(Integer id);
    List<Product> selectByZone(Integer zone);

    int changeStatus(@Param("id")Integer id,@Param("status")Integer status);

    List<Product> selectByName(String name);
}